package com.ojoin.trade.common_core.web.service;

import java.util.List;

import org.springframework.data.domain.Pageable;

import com.ojoin.trade.common.exception.BusinessException;
import com.ojoin.trade.common.web.service.BaseService;
import com.ojoin.trade.common_core.web.domain.TbTransferTokenStatus;
import com.ojoin.trade.common_core.web.domain.TransferErrorStatusInfo;

/**
 * 转账操作状态记录服务接口
 * @author guoting
 *
 */
public interface TransferTokenStatusService extends BaseService<TbTransferTokenStatus> {
	
	/**
	 * 新建转账操作记录，生成token并返回(T0000017)
	 * 
	 * @return token
	 * 说明：
	 * 向tb_transfer_token_status表插入一条记录，记录状态为新建，记录业务日志
	 * 
	 * @throws BusinessException
	 */
	public String insertTransferTokenInfo(TbTransferTokenStatus statusvo) throws BusinessException;

	/**
	 * 更新转账操作状态(T0000018)
	 * @param token
	 * @param transstatus
	 * 
	 * 说明：
	 * 更新tb_transfer_token_status表的指定token的状态值，记录业务日志
	 * @throws BusinessException
	 */
	public int updateTransferTokenStatus(String token, int transstatus,String msg) throws BusinessException;

	/**
	 * 查询转账状态异常列表(T0000032)
	 * @return
	 * @throws BusinessException
	 */
	public List<TransferErrorStatusInfo> queryDoingTransferList(Pageable page)
			throws BusinessException;

    public TransferErrorStatusInfo queryByToken(String token) throws BusinessException;
}
